package com.chendx.store.api.order;

import com.chendx.model.common.dtos.ResponseResult;
import com.chendx.model.order.dto.OrderDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * Created by chendx on 2022/4/20.
 */
public interface OrderControllerApi {

    /**
     * 查询用户订单
     * @return
     */
    public ResponseResult loadOrderPage(OrderDto dto);

    /**
     * 用户所有订单
     * @return
     */
    public ResponseResult loadUserAllOrder();

    /**
     *
     * 新增订单
     * @param dto
     * @return
     */
    public ResponseResult addCartOrder(OrderDto dto);

    /**
     * 获取优惠后的金额
     * @param prefId
     * @return
     */
    public ResponseResult afterPrePrice(String prefId);

    /**
     * 商品页面结算订单
     * @param dto
     * @return
     */
    ResponseResult addOrder(OrderDto dto);

    /**
     * 查询订单
     * @param id
     * @return
     */
    public ResponseResult one(String id);

    /**
     * 订单支付
     * @param orderId
     * @return
     */
    @PostMapping("/pay")
    public ResponseResult pay( OrderDto dto);

    /**
     * 关闭订单
     * @param id
     * @return
     */
    public ResponseResult close(String id);

    /**
     * 删除订单
     * @param id
     * @return
     */
    public ResponseResult delete(String id);

    /**
     * 取消订单
     * @param id
     * @return
     */
    public ResponseResult cancelOrder(String id);

    /**
     * 订单确认收货
     * @param id
     * @return
     */
    public ResponseResult goodsOrder(String id);
}
